package com.smh.finaltest;

public class Test {
    public static void main(String[] args) {
        final Person person = new Person();
        //person = new Person();//无法改变其地址值
        person.setAge(12);
        person.setName("sda");
        System.out.println(person.getName()+","+person.getAge());
        System.out.println(Math.PI);

    }

    final class student {
        final String name = "123";

        //name = "asdas";无法赋值
        public final void eat() {
            System.out.println("eat");
        }
    }

    //class banzhang extends student{//无法继承
//        @Override
//        public void eat(){
//
//        } 无法重写
//}
    static class Person {
        private String name;
        private int age;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public Person(String name, int age) {
            this.name = name;
            this.age = age;
        }

        public Person() {
        }
    }
}
